package Car.bo.impl;

import Car.bo.CarBo;
import Car.dao.CarDao;
import Car.dao.impl.CarDaoImpl;
import Car.model.Car;
import Car.model.Transport;
import Car.model.spr.*;

import java.util.List;

/**
 * Created by Новак on 27.11.2014.
 */
public class CarBoImpl implements CarBo {
    private CarDao carDao;

    @Override
    public List getAllCar() {
        return carDao.getAllCar();
    }

    @Override
    public Car getCarId(int id) {
        return carDao.getCarId(id);
    }

    @Override
    public List<spr_Color> getColor() {
        return carDao.getColor();
    }

    @Override
    public List<spr_Transmission> getTransmission() {
        return carDao.getTransmission();
    }

    @Override
    public List<spr_Privod> getPrivod() {
        return carDao.getPrivod();
    }

    @Override
    public List<spr_Brand> getBrand() {
        return carDao.getBrand();
    }

    @Override
    public List<spr_Currency> getCurrency() {
        return carDao.getCurrency();
    }

    @Override
    public List<spr_Model> getModel() {
        return carDao.getModel();
    }

    @Override
    public List<spr_CarType> getCarType() {
        return carDao.getCarType();
    }

    @Override
    public List<spr_Condition> getCondition() {
        return carDao.getCondition();
    }

    @Override
    public List<spr_TransportType> getTransportType() {
        return carDao.getTransportType();
    }

    @Override
    public List<Transport> getTransports() {
        return carDao.getTransports();
    }

    @Override
    public void addCar(Car car,Transport tr) {
        carDao.addCar(car,tr);
    }

    @Override
    public void addTransport(Transport tr) {
        carDao.addTransport(tr);
    }

    public void setCarDao(CarDaoImpl carDao) {
        this.carDao = carDao;
    }

    public CarDao getCarDao() {
        return this.carDao;
    }

    public void setCarDao(CarDao carDao) {
        this.carDao = carDao;
    }
}
